<?php




/*echo '
<img src="./images/testdrive11111.png" style="width:92%;height:100%;margin-left:4%;margin-top:20px;"/> 
<a href="succuss.php"><img src="./images/testdrive1.png" style="width:100%;height:100%;margin-bottom:160px;"/></a>

';*/
$type = $_GET['type'];
$biaoji = $_GET['biaoji'];
$user_id=$_SESSION['user_id'];
$name = $_GET['name'];
$phone = $_GET['phone'];

if ($type == 1) {

    echo '<form id="myForm" action="succuss.php?cls=2" method="post"> ';
    echo '<div style="font-size:22px;font-weight:500;text-align:center;margin-top:20px;" class="pangmen">' . ($type == 1 ? '球员家长' : '球会会员及嘉宾') . '<br>试乘试驾安排</div>';

    echo '
        <table class="testdrivetable"  style="width:92%; margin-left:4%; border-collapse:collapse; margin-top:20px; font-size:3.6vw; border-collapse: collapse; ">
            <!-- 表头 -->
            
            <tr style="background-color: #2A507D; color: #ffffff;">
                <th style="padding: 10px; " class="pangmen">时间</th>
                <th style="padding: 10px; " class="pangmen">活动安排</th>
            </tr>
              <tr style="background-color: #2A507D; color: #ffffff;">
                        <td colspan="2" style="padding: 10px; text-align: center;">A组</td>
                    </tr>
            <tr>
                <td style="padding: 10px; border: 1px solid #B0C4DE; text-align: center; white-space: nowrap;" class="poppin">09:00 - 09:05</td>
                <td style="padding: 10px; border: 1px solid #B0C4DE;">试驾签到、分组</td>
            </tr>
            <tr>
                <td style="padding: 10px; border: 1px solid #B0C4DE; text-align: center; white-space: nowrap;" class="poppin">09:05 - 09:15</td>
                <td style="padding: 10px; border: 1px solid #B0C4DE;">绕车讲解/安全驾驶培训</td>
            </tr>

            <tr>
                <td style="padding: 10px; border: 1px solid #B0C4DE; text-align: center;white-space: nowrap;" class="poppin">09:15 - 09:30</td>
                <td style="padding: 10px; border: 1px solid #B0C4DE;">试乘试驾</td>
            </tr>
            <tr>
                <td style="padding: 10px; border: 1px solid #B0C4DE; text-align: center;white-space: nowrap;" class="poppin">09:30 - 09:40</td>
                <td style="padding: 10px; border: 1px solid #B0C4DE;">自动泊车讲解</td>
            </tr>

            <tr>
                <td style="padding: 10px; border: 1px solid #B0C4DE; text-align: center; white-space: nowrap;" class="poppin">09:40 - 10:00</td>
                <td style="padding: 10px; border: 1px solid #B0C4DE;">试乘试驾/停车</td>
            </tr>

             <tr style="background-color: #2A507D; color: #ffffff;">
                        <td colspan="2" style="padding: 10px; text-align: center;">B组</td>
                    </tr>

            <tr>
                <td style="padding: 10px; border: 1px solid #B0C4DE; text-align: center; white-space: nowrap;" class="poppin">10:30 - 10:35</td>
                <td style="padding: 10px; border: 1px solid #B0C4DE;">试驾签到、分组</td>
            </tr>
            <tr>
                <td style="padding: 10px; border: 1px solid #B0C4DE; text-align: center; white-space: nowrap;" class="poppin">10:35 - 10:45</td>
                <td style="padding: 10px; border: 1px solid #B0C4DE;">绕车讲解/安全驾驶培训</td>
            </tr>
              <tr>
                <td style="padding: 10px; border: 1px solid #B0C4DE; text-align: center; white-space: nowrap;" class="poppin">10:45 - 11:00</td>
                <td style="padding: 10px; border: 1px solid #B0C4DE;">试乘试驾</td>
            </tr>
             <tr>
                <td style="padding: 10px; border: 1px solid #B0C4DE; text-align: center; white-space: nowrap;" class="poppin">11:00 - 11:10</td>
                <td style="padding: 10px; border: 1px solid #B0C4DE;">自动泊车讲解</td>
            </tr>
              <tr>
                <td style="padding: 10px; border: 1px solid #B0C4DE; text-align: center; white-space: nowrap;" class="poppin">11:10 - 11:30</td>
                <td style="padding: 10px; border: 1px solid #B0C4DE;">试乘试驾/停车</td>
            </tr>

        </table>
';

    echo '
	<div style="display:flex;flex-direction:column;margin-top:10px;width:92%;margin-left:4%;border-radius:5vw;overflow:hidden;" class="poppin">
		<div style="width:100%;height:10vw;display:flex;justify-content:center;align-items:center;font-size:3.6vw;color:#041b21;background-color:#fff;" class="pangmen">
		请选择需要参加的场次
		</div>
		<div style="width:100%;display:flex;flex-direction:column;font-size:3.6vw;background-color:#2F6064;color:#fff;padding:0 5vw 5vw 5vw;" > 
         

				<div style="display:flex;flex-direction:column;">  
					<label for="option1" style="display:flex;align-items:center;">
						<input type="radio" id="option1" name="time" value="1" style="margin-right:8px;"> 12月11日09:00-10:00
					</label>
				</div>
				<div style="display:flex;flex-direction:column;">  
					<label for="option2" style="display:flex;align-items:center;">
						<input type="radio" id="option2" name="time" value="2" style="margin-right:8px;"> 12月11日10:30-11:30
					</label>
				</div>
                <div style="display:flex;flex-direction:column;">  
					<label for="option3" style="display:flex;align-items:center;">
						<input type="radio" id="option3" name="time" value="3" style="margin-right:8px;"> 12月12日09:30-10:00
					</label>
				</div>
				<div style="display:flex;flex-direction:column;">  
					<label for="option4" style="display:flex;align-items:center;">
						<input type="radio" id="option4" name="time" value="4" style="margin-right:8px;"> 12月12日10:30-11:30
					</label>
				</div>
		</div>
	</div>
        ';

 




} else if ($type == 2) {
    echo '  <form id="myForm" action="succuss.php?cls=2" method="post" style="width:92%;margin-left:4%;">';
    echo '<div style="font-size:22px;font-weight:500;text-align:center;margin-top:20px;" class="pangmen">' . ($type == 1 ? '球员家长' : '球会会员及嘉宾') . '<br>试乘试驾安排</div>';



    echo '<table class="testdrivetable pangmen" style="width: 100%; border-collapse: collapse; margin-top:20px;">
                    <!-- 表头 -->
                    <tr style="background-color: #2A507D; color: #ffffff;">
                        <th style="padding: 10px;">时间</th>
                        <th style="padding: 10px;">安排</th>
                    </tr>

                    <!-- A组 -->
                    <tr style="background-color: #2A507D; color: #ffffff;">
                        <td colspan="2" style="padding: 10px; text-align: center;">A组</td>
                    </tr>
                    <tr>
                        <td style="padding: 10px; border: 1px solid #B0C4DE; text-align: center;">14:00 - 14:05</td>
                        <td style="padding: 10px; border: 1px solid #B0C4DE;">试驾签到，分组</td>
                    </tr>
                    <tr>
                        <td style="padding: 10px; border: 1px solid #B0C4DE; text-align: center;">14:05 - 14:15</td>
                        <td style="padding: 10px; border: 1px solid #B0C4DE;">绕车讲解/安全驾驶培训</td>
                    </tr>
                    <tr>
                        <td style="padding: 10px; border: 1px solid #B0C4DE; text-align: center;">14:15 - 14:30</td>
                        <td style="padding: 10px; border: 1px solid #B0C4DE;">试乘试驾</td>
                    </tr>
                     <tr>
                        <td style="padding: 10px; border: 1px solid #B0C4DE; text-align: center;">14:30 - 14:40</td>
                        <td style="padding: 10px; border: 1px solid #B0C4DE;">自动泊车讲解</td>
                    </tr>
                    <tr>
                        <td style="padding: 10px; border: 1px solid #B0C4DE; text-align: center;">14:40 - 15:00</td>
                        <td style="padding: 10px; border: 1px solid #B0C4DE;">试乘试驾/停车</td>
                    </tr>

                    <!-- B组 -->
                    <tr style="background-color: #2A507D; color: #ffffff;">
                        <td colspan="2" style="padding: 10px; text-align: center;">B组</td>
                    </tr>
                    <tr>
                        <td style="padding: 10px; border: 1px solid #B0C4DE; text-align: center;">15:00 - 15:05</td>
                        <td style="padding: 10px; border: 1px solid #B0C4DE;">试驾签到，分组</td>
                    </tr>
                    <tr>
                        <td style="padding: 10px; border: 1px solid #B0C4DE; text-align: center;">15:05 - 15:15</td>
                        <td style="padding: 10px; border: 1px solid #B0C4DE;">绕车讲解/安全驾驶培训</td>
                    </tr>
                    <tr>
                        <td style="padding: 10px; border: 1px solid #B0C4DE; text-align: center;">15:15 - 15:30</td>
                        <td style="padding: 10px; border: 1px solid #B0C4DE;">试乘试驾</td>
                    </tr>
                     <tr>
                        <td style="padding: 10px; border: 1px solid #B0C4DE; text-align: center;">15:30 - 15:40</td>
                        <td style="padding: 10px; border: 1px solid #B0C4DE;">自动泊车讲解</td>
                    </tr>
                    <tr>
                        <td style="padding: 10px; border: 1px solid #B0C4DE; text-align: center;">15:40 - 16:00</td>
                        <td style="padding: 10px; border: 1px solid #B0C4DE;">试乘试驾/停车</td>
                    </tr>
                </table>
';

echo '

<div style="display:flex;flex-direction:column;margin-top:10px;width:100%;border-radius:5vw;overflow:hidden;" class="poppin">
    <div style="width:100%;height:10vw;display:flex;justify-content:center;align-items:center;font-size:3.6vw;color:#041b21;background-color:#fff;" class="pangmen">
        请选择需要参加的场次
    </div>
    <div style="width:100%;display:flex;flex-direction:column;font-size:3.6vw;background-color:#2F6064;color:#fff;padding:0 5vw 5vw 5vw;"> 
        <div style="margin-top:4px;margin-bottom:4px;height:30px;width:100%;padding-left:20px;">
            <font class="poppin">12 </font>月 <font class="poppin">9</font> 日至 <font class="poppin">13</font> 日 <font class="poppin">14:00-16:00 </font>
        </div>
        <div style="margin-top:4px;margin-bottom:4px;height:30px;padding-left: 20px;padding-right: 30px;line-height: 1.3;">
            东莞观澜湖球会-东莞大屏障森林公园-东莞观澜湖球会
        </div>
        
        <!-- 将单选按钮放入这里的 form -->
            <div style="font-size:14px;margin-top:10px;width:92%;margin-bottom:20px;display:flex;align-items:center;flex-direction:column;justify-content:flex-start;">';

            // 场次选择选项
            for ($i = 1; $i <= 10; $i++) {
                $date = 9 + floor(($i - 1) / 2); // 设置日期
                $time = ($i % 2 == 1) ? "14:00-15:00" : "15:00-16:00"; // 设置时间段

                echo '
                <div style="display:flex;flex-direction:row;margin-top:1vw;width:100%;justify-content:flex-start;">  
                    <label for="option' . $i . '" style="display:flex;flex-direction:column;height:5vw;margin-top:2vw;margin-bottom:2vw;">
                        <div style="width:90%"> 
                            <input type="radio" id="option' . $i . '" name="time" value="' . $i . '">  
                            <font class="poppin">12</font>月<font class="poppin">' . $date . '</font>日 <font class="poppin">' . $time . '</font>
                        </div>
                    </label>
                </div>';
            }

            echo '
            </div>
          
    </div>
</div>
';


  
}
echo '
<input type="hidden" id="image" name="image">
<input name="cls" type="hidden" value="2"/>
<input name="type" type="hidden" value="' . $type . '"/>
    <input name="biaoji" type="hidden" value="' . $biaoji . '"/>

	<div style="display:flex;flex-direction:column;margin-top:10px;width:92%;margin-left:4%; border-radius:5vw;overflow:hidden;" class="poppin">
		<div style="width:100%;height:10vw;display:flex;justify-content:center;align-items:center;font-size:3.6vw;color:#041b21;background-color:#fff;">
		请填写试乘试驾信息
		</div>
		<div style="width:100%;display:flex;flex-direction:column;font-size:3.6vw;background-color:#2F6064;color:#fff;" > 
		

            <div style="font-size:14px;width:100%;border-radius:3vw; overflow:hidden; display:flex;align-items:center;flex-direction:column;justify-content:center;
            background:linear-gradient(145deg, #1a6b6d, #0a313c);
            ">
                
                <div style="display:flex;flex-direction:row;width:90%;margin-left:5%;margin-top:5vw;">
                    <input name="name" placeholder="  姓名" type="text" style="width:40%;height:10vw;border-radius:10vw;background-color:#fff;color:#333;margin-left:auto;margin-right:auto;"  value="'.$name.'"/>
                    <select name="sex" class="custom-select" style="width:40%;height:10vw;border-radius:10vw;background-color:#fff;color:#333;margin-left:auto;margin-right:auto;">
                        <option value="" disabled selected>性别</option>
                        <option style="color: #333;" value="男">男</option>
                        <option style="color: #333;" value="女">女</option>
                    </select>
                </div>

                <div style="display:flex;flex-direction:row;width:90%;margin-left:5%;margin-top:5vw;">
                    <input name="age" placeholder="  年龄" type="text" style="width:40%;height:10vw;border-radius:10vw;background-color:#fff;color:#333;margin-left:auto;margin-right:auto;" />
                  <input name="cardtype" placeholder="  身份证号" type="text" style="width:40%;height:10vw;border-radius:10vw;background-color:#fff;color:#333;margin-left:auto;margin-right:auto;" />

                </div>
                 <div style="display:flex;flex-direction:row;width:90%;margin-left:5%;margin-top:5vw;">
                    
                   <input name="jiazhao" placeholder="  驾照号" type="text" style="width:90%;height:10vw;border-radius:10vw;background-color:#fff;color:#333;margin-left:auto;margin-right:auto;" />

                </div>
                <div style="display:flex;flex-direction:row;width:90%;margin-left:5%;margin-top:5vw;">
                    <input name="phoneno" placeholder="  手机" type="text" style="width:90%;height:10vw;margin-left:5%;border-radius:10vw;background-color:#fff;color:#333;margin-left:auto;margin-right:auto;" value="'.$phone.'" />
                </div>

                <div style="display:flex;flex-direction:row;width:90%;margin-left:5%;margin-top:5vw;">
                    <select name="selecttype" class="custom-select" style="width:90%;height:10vw;margin-left:5%;border-radius:10vw;background-color:#fff;color:#333;margin-left:auto;margin-right:auto;">
                        <option value="" disabled selected>试乘试驾</option>
                        <option value="试乘">试乘</option>
                        <option value="试驾">试驾</option>
                    </select>
                </div>';
if ($type == 1) {
    echo '<div style="display:flex;flex-direction:row;width:90%;margin-left:5%;margin-top:5vw;margin-bottom:5vw;">
                    <select name="testtype" class="custom-select" style="width:90%;height:10vw;margin-left:5%;border-radius:10vw;background-color:#fff;color:#333;margin-left:auto;margin-right:auto;">
                        <option value="" disabled selected>意向车型</option>
                        <option value="I5">i5(已约0人/限8人)</option>
                        <option value="I7">i7(已约0人/限6人)</option>
                        <option value="IX">iX(已约0人/限6人)</option>
                    </select>
                </div>';
}else{
    echo '<div style="display:flex;flex-direction:row;width:90%;margin-left:5%;margin-top:5vw;margin-bottom:5vw;">
                    <select name="testtype" class="custom-select" style="width:90%;height:10vw;margin-left:5%;border-radius:10vw;background-color:#fff;color:#333;margin-left:auto;margin-right:auto;">
                        <option value="" disabled selected>意向车型</option>
                        <option value="I5">i5(已约0人/限4人)</option>
                        <option value="I7">i7(已约0人/限4人)</option>
                        <option value="IX">iX(已约0人/限2人)</option>
                    </select>
                </div>';

}

            echo '</div>



		</div>
	</div>



</form>
<a href="#" onclick="submitForm();" style="text-decoration:none;color:#fff;">

    <div style="width:260px;height:50px;margin-left:auto;display:flex;justify-content:center;margin-right:auto;
    align-items:center; font-size:22px;border-radius:10px;border:2px solid #fff;margin-top:20px;
    ">提交报名</div></a>
<a href="#" onclick="submitFormMyorder();" style="text-decoration:none;color:#fff;">

    <div style="width:260px;height:50px;margin-left:auto;display:flex;justify-content:center;margin-right:auto;
    align-items:center; font-size:22px;border-radius:10px;border:2px solid #fff;margin-top:20px;
    ">我的预约</div></a>
    

<style>
/* 修改select元素的CSS样式 */
select {
    width: 200px;
    padding: 5px;
    font-size: 16px;
    border: 1px solid #ccc;
    border-radius: 3px;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-color: #fff;
    text-align: center;
       text-indent: calc(50% - 1em); /* 模拟内容居中 */
    text-align-last: center; /* 适配部分浏览器 */
    padding-left: 0; /* 重置左内边距 */
    -webkit-appearance: none;
    appearance: none;
}

/* 修改option元素的CSS样式 */
option {
    background-color: #f8f8f8;
    padding: 5px;
    font-size: 16px;
}

/* 修改option在hover时的CSS样式 */
option:hover {
    background-color: #f0f0f0;
}
</style>

<script>
 
</script>

<div style="font-size:14px;margin-top:20px;width:92%;margin-left:4%;margin-bottom:160px;display:flex;align-items:center;flex-direction:column;justify-content:flex-start;">
    <div style="margin-top:4px;margin-bottom:4px;height:30px;width:100%;">温馨提示：</div>
    <div style="padding-left:14px;margin-top:4px;margin-bottom:4px;height:30px;width:100%;"><img src="./images/icon_point.png" style="width:11px;height:11px;"/> 驾龄需满<span class="poppin"> 1 </span>年及以上</div>
    <div style="padding-left:14px;margin-top:4px;margin-bottom:4px;height:30px;width:100%;"><img src="./images/icon_point.png" style="width:11px;height:11px;"/> 请至少提前 <span class="poppin">24</span> 小时预约</div>
    <div style="padding-left:14px;margin-top:4px;margin-bottom:4px;height:30px;width:100%;"><img src="./images/icon_point.png" style="width:11px;height:11px;"/> 试驾当日请提供驾驶证原件（或电子版本）</div>
</div>
';
